package org.example.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.example.entity.Admin;
import org.example.entity.Admin;

import java.util.List;

public interface AdminMapper {



    List<Admin> selectAll(Admin admin);

    Admin selectById(Integer id);

    @Insert("insert into admin( username,password,role,name,avatar) VALUES (#{username},#{password},#{role},#{name},#{avatar})")
    void insert(Admin admin);

    
    void delete(Integer id);

    void update(Admin admin);

    @Select("select * from admin where username=#{username}")
    Admin selectByUsername(String username);
}
